package xiaomogu.task_engine.admin.core.route.strategy;

import xiaomogu.task_engine.admin.core.route.AddressRoute;
import xiaomogu.task_engine.core.biz.model.Response;
import xiaomogu.task_engine.core.biz.model.TriggerParam;

import java.util.List;


public class Random extends AddressRoute {

    private static java.util.Random $random = new java.util.Random();

    @Override
    public Response<String> addressRoute(List<String> addressList, TriggerParam triggerParam) {
        String address = addressList.get($random.nextInt(addressList.size()));
        return new Response<String>(address);
    }

}
